﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZBar;

namespace ScanCode
{
    /// <summary>
    /// 扫描信息
    /// </summary>
    public class ScanSymbol
    {

        /// <summary>
        /// 二维码信息 
        /// </summary>
        public string Data { get; set; }

        /// <summary>
        /// 扫描质量，数值越大，代表质量越好 
        /// 重点关注数值较小，建议核对
        /// </summary>
        public int Quality { get; set; }


        /// <summary>
        /// 扫描码类型
        /// </summary>
        public SymbolType SymbolType { get; set; }


        public static ScanSymbol CreateSymbol(Symbol symbol)
        {
            return new ScanSymbol
            {
                Data = symbol.Data,
                Quality = symbol.Quality,
                SymbolType = symbol.Type
            };
        }
    }
}
